<template>
    <div>
        <el-upload action="http://localhost:8000/upload/file" :data="uploadParam" :on-success="uploadSuccess">
            <el-button type="primary">上传</el-button>
        </el-upload>
    </div>
</template>

<script>
export default {
    name: 'TeachingReaource',
    data() {
        return {
            uploadParam: {
                type: 1
            }
        }
    },
    methods: {
        uploadSuccess(res) {
            console.log(res)
        }
    }
}
</script>